package com.summer.framework.common.entity.response;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @auther: 杨杰
 * @date: 2019/1/14 09:34
 * @description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ListResponse<T extends Object> extends BaseResponse {
    List<T> data;

    public ListResponse(Integer status, String message, List<T> data) {
        super(status, message);
        this.data = data;
    }

    public ListResponse(Integer status, List<T> data) {
        super(status);
        this.data = data;
    }

    /*public ListResponse(Integer status,List<T> data) {
        super(status,"");
        this.data = new ListData<>(data.size(), data);
    }

    public class ListData<T> {
        long count;
        List<T> rows;

        public ListData(long count, List<T> rows) {
            this.count = count;
            this.rows = rows;
        }

        public ListData() {
        }

        public long getCount() {
            return count;
        }

        public void setCount(long count) {
            this.count = count;
        }

        public List<T> getRows() {
            return rows;
        }

        public void setRows(List<T> rows) {
            this.rows = rows;
        }
    }*/

}
